#ifndef Thread_H
#define Thread_H
#include <string>
#include <pthread.h>
#include <map>

   class Thread
   {
     public:
       Thread();

       virtual ~Thread();

       void start(void);

       void stop(void);

       void wait(void);


     protected:   //methods
      virtual void init();

      virtual void fini();

      virtual void run() = 0;

     private:     //methods
         Thread(const Thread& copy);

         Thread& operator=(const Thread& rhs);
         

         static void* Run( void* obj );

     private:     
       pthread_t tid_;
       pthread_mutex_t lock_;
   };

#endif

